import { Commit } from "vuex";

interface IStars {
  id?: string;
  name?: string;
  title?: string;
  title_two?: string;
  vertical_num?: number;
  horizonta_num?: number;
  create_time?: string;
  is_del?: string;
  floor_color?: string;
  floor_img?: string;
}

interface IStar1_state {
  stars: Array<IStars>;
}
interface IPar {
  r: string;
  token: string;
  terminal: string;
}
interface IStar1 {
  namespaced: boolean;
  state: IStar1_state;
  actions: {
    getstar: ({ commit }: { commit: Commit }, params: IPar) => void;
  };
  mutations: {
    GET_STAR: (state: IStar1_state, { res }: { res: IStars[] }) => void;
  };
}

interface IHorizontal {
  id?: string;
  item_id?: string;
  floor_id?: string;
  xiaoliang?: string;
  name?: string;
  pic_url?: string;
  hd_leixing?: null;
  activity_type?: string;
  price?: number;
  want_to_buy_num?: string;
  sale_price?: number;
  use_quan?: string;
  coupon_amount?: number;
  discount_label?: [];
  self_selling_point?: string;
  is_save?: string;
  month_sale_num?: string;
  horizontal?: IHorizontal[];
  vertical?: IHorizontal[];
}
interface IStars2 {
  data?: IHorizontal[];
  code: number;
  msg: string;
  now: string;
}

interface IPar2 {
  floor_id: string;
  token: string;
  terminal: string;
}
interface IStar2_state {
  stars: Array<IStars2>;
}
interface IStar2 {
  namespaced: boolean;
  state: IStar2_state;
  actions: {
    getstar: ({ commit }: { commit: Commit }, params: IPar2) => void;
  };
  mutations: {
    GET_STAR: (state: IStar2_state, { res }: { res: IStars2 }) => void;
  };
}
export { IStar1, IStar2, IStars2 };
